package main

import (
	"encoding/json"
	"fmt"
)

type User struct {
	Name    string `7json:"name"`          //将Name转为name
	Age     int    `7json:"age,omitempty"` // 如果age没有赋值为空值（输出结果默认是0）使用omitempty关键字可以不输出空值
	Address string `7json:"-"`             //将Address字段忽略 不输出
}

func main() {
	user := User{Name: "Num2", Age: 10, Address: "河南"}
	user2, info := json.Marshal(user)
	fmt.Println(user)
	fmt.Println(info)
	fmt.Println(string(user2))

	fmt.Println("=============================")
label1:
	for i := 0; i < 3; i++ {
		for j := 0; j < 3; j++ {
			if i == 4 && j == 5 {
				break label1
			}
			fmt.Println(i, "==========", j)
		}
	}
}
